<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta http-equiv="Content-Type" content="text/html;  charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>-话题编辑</title>
<link href="/admin/style/user/admin.css" type="text/css" rel="stylesheet" media="screen" />
<script src ="/js/jquery/jquery.js"></script>

</head>
<body>
	<div class="sec-title">
		<h3 class="title"><a href="#">游戏秀</a><i>&gt;</i>攻略话题编辑</h3>
	</div>
	<div style="margin-top: 15px;">
		<div id="form2">
		<form id="form1">
		<table>
			
			<tr>
				<td>* 话题类型：</td><td>
				<select name="topic_id" id="topic_id">
				{%foreach name=count key=key item=value from=$g_show.site_name%}
				<option value={%$key%}>{%$value%}</option>
				{%/foreach%}
				</select>
				</td>
			</tr>
			<tr>
				<td>* 抓取类型：</td><td>
				<select name="get_type" id="get_type">
				{%foreach name=count key=key item=value from=$g_show.gonglue_type%}
				<option value={%$key%}>{%$value.desc%}</option>
				{%/foreach%}
				</select>
				</td>
			</tr>

			<tr>
				<td>* url:</td><td>
				<input type=text value="{%$g_show.data.url%}" name="url" id="url" size=100 />
				</td>
			</tr>

			{%if $g_show.id%}
			<tr>
				<td>* 状态：</td><td>
				<select name="status" id="status">
				<option value=1>正常</option>
				<option value=0>已删</option>
				</select>
				</td>
			</tr>
			{%/if%}

		
			<tr>
				<td></td><td colspan=3>
					<input type="button" class="tucao_submit" value="提交" />
					&nbsp;&nbsp;&nbsp;
					<input type="button" value="重置" />
				</td>
			</tr>
			<input type="hidden" name="id" value="{%$g_show.id%}">
			</form>
			
		</table>
		</div>
	</div>


	<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</body>
<script type="text/javascript" language="javascript">


//YOUXIXIU.MAIN.CheckMessage.init();


$("#need_cron").find("option[value="+"{%$g_show.data.need_cron%}"+"]").attr("selected",true);
$("#status").find("option[value="+"{%$g_show.data.status%}"+"]").attr("selected",true);
$("#show_type").find("option[value="+"{%$g_show.data.show_type%}"+"]").attr("selected",true);


$(".tucao_submit").bind("click",function(){

	$.ajax({
		url:"gonglue_cron_topic_edit_post.php",
		type:"post",
		data:$("#form1").serialize(),
		dataType:"json",
		 complete:function(xhr,status){
      var result = eval("("+(xhr.responseText)+")");
			
			if(result.error == "0"){
			alert("成功");
				location.reload();                   
			}else{
				var errmsg = result.errmsg;
				alert(errmsg)
			}

			widget = null;
		}
	});
});
</script>
</html>
